<?php

class jschong_controller extends controller {

    public $current = "index";
    public $in = true;

    public function __construct() {
        parent::__construct();
        spider::write($GLOBALS['W']['id']);
    }

    public function index() {
        $this->view();
    }

    public function _empty() {
        $url = $this->rest_uri;
        if (preg_match("#\w+/\d*\.html#", $url)) {
            $this->view();
        } else {
            $this->index();
        }
    }

    //内容页
    public function view() {
        $data = jsc::get_data($GLOBALS['W']['id']);
        extract($data); 
        require $this->jsctpl('index');
    }

    

}
